package com.jiandian.dao;

import com.jiandian.entity.Banner;
import com.jiandian.page.PageInfo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Component;

import java.sql.Timestamp;
import java.util.List;

/**
 * 轮播图片 Mapper
 *
 * @author Houqi Fu
 * @date 2019/01/24
 */
@Mapper
@Component
public interface BannerMapper {
    Banner selectByPrimaryKey(Integer id);

    List<Banner> selectAll(PageInfo pageInfo);

    int selectCount(PageInfo pageInfo);

    List<Banner> batchQueryByIds(List<Integer> ids);

    int updateByPrimaryKey(Banner record);

    int insert(Banner record);

    int batchInsert(List<Banner> list);

    int batchDeleteById(List<Integer> ids);

    int deleteByPrimaryKey(Integer id);

    int updateBanner(@Param("url")String url, @Param("gmtModified")Timestamp gmtModified);
}
